﻿<UserControl x:Class="ScrumTable.UI.View.WinTouch.UserControls.MemberControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:s="http://schemas.microsoft.com/surface/2008"
    xmlns:CustomControl="clr-namespace:ScrumTable.UI.View.CustomControl;assembly=ScrumTable.UI.View" xmlns:UserControls="clr-namespace:ScrumTable.UI.View.WinTouch.UserControls" xmlns:Converter="clr-namespace:ScrumTable.UI.View.Converter;assembly=ScrumTable.UI.View" 
    s:SurfaceDragDrop.Drop="OnMemberDrop" s:SurfaceDragDrop.PreviewQueryTarget="OnMemberPreviewQueryTarget" AllowDrop="True">
    <UserControl.Resources>
        <Converter:ConverterBoolVisibility x:Key="IsVisible"/>
    </UserControl.Resources>
    <Grid>

        <Border Background="White" BorderThickness="1" BorderBrush="Black" CornerRadius="2" >
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="50"/>
                    <ColumnDefinition Width="70"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="32"/>
                    <RowDefinition Height="18"/>
                    <RowDefinition Height="18"/>
                </Grid.RowDefinitions>              
                <UserControl Background="{Binding Color}" Grid.Column="1"  Grid.RowSpan="2"/>
                <UserControls:BarControl FirstColorText="White"  SecondColorText="White" Grid.Row="1" Grid.Column="1" FirstValue="{Binding WorkCompleted}" SecondValue="{Binding WorkRemaining}" FirstColor="Green" SecondColor="Red" BackColor="Transparent" Margin="0" />
                <CustomControl:WebAsyncReportMemberImage  Grid.RowSpan="2" UriBitmap="{Binding Picture}" />
                <TextBlock Margin="3,0,3,0" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="3" Text="{Binding Name}" FontSize="12" TextTrimming="CharacterEllipsis" />
                <Border Background="{StaticResource IconMemberOnline}" HorizontalAlignment="Right"  VerticalAlignment="Top" Grid.ColumnSpan="2" Width="18" Height="14" Visibility="{Binding CanLogIn, Converter={StaticResource IsVisible}}" Margin="5"/>
                <Grid Grid.ColumnSpan="10" Grid.RowSpan="10"  x:Name="DropRootControl" Opacity="0.5"/>
            </Grid>
         
        </Border>
            
    </Grid>


</UserControl>
